{% extends 'TopxiaWebBundle:Group:setting-layout.html.twig' %}

{% if app.request.get('page')=='logoCrop' %}
  {% set script_controller = 'group/group_logo_crop' %}
  {% set settingNav = 'logo' %}
{% endif %}

{% if app.request.get('page')=='backGroundLogoCrop' %}
  {% set script_controller = 'group/group_backgroundlogo_crop' %}
  {% set settingNav = 'background' %}
{% endif %}

{% block title %}{{groupinfo.title}}{{'小组'|trans}} - {{ parent() }}{% endblock %}

{% block group_setting_body %}

  <div class="form-group clearfix">
    <div class="col-md-offset-2 col-md-8 controls">
      <img class="img-responsive" src="{{ filepath(pictureUrl) }}"
      id="logo-crop"
      width="{{scaledSize.width}}" height="{{scaledSize.height}}" data-natural-width="{{ naturalSize.width }}" data-natural-height="{{ naturalSize.height }}"/>
      <div class="help-block">{{'提示：请选择图片裁剪区域。'|trans}}</div>
    </div>
  </div>
  <div class="form-group clearfix">
    <div class="col-md-offset-2 col-md-8 controls">
      <a class="btn btn-fat btn-primary"
      id="upload-picture-btn"
      {% if app.request.get('page')=='backGroundLogoCrop' %}
      data-reload-url="{{path('group_backgroundlogo_set',{id:groupinfo.id})}}"
      {% elseif app.request.get('page')=='logoCrop' %}
      data-reload-url="{{path('group_logo_set',{id:groupinfo.id})}}"
      {% endif %}
      >{{'保存'|trans}}</a>
    </div>
  </div>


{% endblock %}